<template>
  <div>
    <preHeader></preHeader>
      <div class="top-block"></div>
      <my-notice v-if="accountInfo == null"></my-notice>
      <div id="account">
        <div class="item" v-for="(item,index) in accountInfo">
        {{index +1}} <p>用户名:{{item.player_name}}</p>
        <p>邮箱：{{item.email}}</p>
        </div>
      </div>

  </div>
</template>

<script>
  import {get_game_account_list} from '@/api/';
  export default {
    data(){
      return{
        tel:'',
        accountInfo:'',//订单信息
      }
    },
    methods:{
      getOreders(){
        this.tel = JSON.parse(localStorage.getItem('tel'));
        get_game_account_list({tel:this.tel}).then( res =>{
          // console.log(res)
          this.accountInfo = res.data
        })
      }
    },
    mounted() {
      this.getOreders();
    }
  }
</script>

<style scoped>
#account{margin: 1em;}
.item{margin-bottom: 10px;border: 1px solid #ccc;padding: 6px;border-radius: 6px;}
</style>
